# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=libpoly
pkgver=0.1.12
pkgrel=1
pkgdesc='C library for manipulating polynomials'
arch=('loong64' 'x86_64')
url="https://github.com/SRI-CSL/libpoly"
license=('LGPL')
depends=('gmp')
makedepends=('cmake' 'ninja' 'python')
source=("https://github.com/SRI-CSL/libpoly/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('f99334c3ecc3aef91dbde77a8ae6b7f3628c7658bb80782e4e8167a08a9a56762a4e599e0c01c13fec994098ab8045ea7e1344243ab93cb7ba658d70324b6e34')

build() {
  cd libpoly-$pkgver
  cmake -GNinja -DCMAKE_INSTALL_PREFIX=/usr .
  ninja
}

package() {
  cd libpoly-$pkgver
  DESTDIR="$pkgdir" ninja install
}
